package com.api.goods;

import com.fengmi.goods.entity.MallGoods;
import com.fengmi.goods.entity.MallGoodsSku;
import com.fengmi.goods.vo.GoodsCatVo;
import com.fengmi.goods.vo.HotGoodsVo;
import com.fengmi.vo.ResultVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("fengmi-goods")
@RequestMapping("goods")
public interface GoodsApi {


    //cat
    @RequestMapping("cat/cascade")
    public List<GoodsCatVo> cascade();

    //brand


    //spec



    @RequestMapping("findHotGoods")
    public List<HotGoodsVo> findHotGoods();


    @RequestMapping("findGoodsHasAuditedForEs")
    public List<MallGoods> findGoodsHasAuditedForEs();



    @RequestMapping("findGoodsForHTML")
    public MallGoods findGoodsForHTML(@RequestParam("spuId") String spuId);


    @RequestMapping("sku/findSkuById")
    public MallGoodsSku findSkuById(@RequestParam("skuId") String skuId);


    @RequestMapping("sku/kcc")
    public ResultVO kcc (@RequestParam("skuId") String skuId, @RequestParam("buyNum") Integer buyNum);
}
